/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class AdminPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ADMIN")
    private BigInteger idAdmin;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_PERSONAL_INFO")
    private BigInteger idPersonalInfo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_BRANCHENTERPRISE1")
    private BigInteger idBranchenterprise1;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ENTERPRISE1")
    private BigInteger idEnterprise1;

    public AdminPK() {
    }

    public AdminPK(BigInteger idAdmin, BigInteger idPersonalInfo, BigInteger idBranchenterprise1, BigInteger idEnterprise1) {
        this.idAdmin = idAdmin;
        this.idPersonalInfo = idPersonalInfo;
        this.idBranchenterprise1 = idBranchenterprise1;
        this.idEnterprise1 = idEnterprise1;
    }

    public BigInteger getIdAdmin() {
        return idAdmin;
    }

    public void setIdAdmin(BigInteger idAdmin) {
        this.idAdmin = idAdmin;
    }

    public BigInteger getIdPersonalInfo() {
        return idPersonalInfo;
    }

    public void setIdPersonalInfo(BigInteger idPersonalInfo) {
        this.idPersonalInfo = idPersonalInfo;
    }

    public BigInteger getIdBranchenterprise1() {
        return idBranchenterprise1;
    }

    public void setIdBranchenterprise1(BigInteger idBranchenterprise1) {
        this.idBranchenterprise1 = idBranchenterprise1;
    }

    public BigInteger getIdEnterprise1() {
        return idEnterprise1;
    }

    public void setIdEnterprise1(BigInteger idEnterprise1) {
        this.idEnterprise1 = idEnterprise1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAdmin != null ? idAdmin.hashCode() : 0);
        hash += (idPersonalInfo != null ? idPersonalInfo.hashCode() : 0);
        hash += (idBranchenterprise1 != null ? idBranchenterprise1.hashCode() : 0);
        hash += (idEnterprise1 != null ? idEnterprise1.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AdminPK)) {
            return false;
        }
        AdminPK other = (AdminPK) object;
        if ((this.idAdmin == null && other.idAdmin != null) || (this.idAdmin != null && !this.idAdmin.equals(other.idAdmin))) {
            return false;
        }
        if ((this.idPersonalInfo == null && other.idPersonalInfo != null) || (this.idPersonalInfo != null && !this.idPersonalInfo.equals(other.idPersonalInfo))) {
            return false;
        }
        if ((this.idBranchenterprise1 == null && other.idBranchenterprise1 != null) || (this.idBranchenterprise1 != null && !this.idBranchenterprise1.equals(other.idBranchenterprise1))) {
            return false;
        }
        if ((this.idEnterprise1 == null && other.idEnterprise1 != null) || (this.idEnterprise1 != null && !this.idEnterprise1.equals(other.idEnterprise1))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.AdminPK[ idAdmin=" + idAdmin + ", idPersonalInfo=" + idPersonalInfo + ", idBranchenterprise1=" + idBranchenterprise1 + ", idEnterprise1=" + idEnterprise1 + " ]";
    }
    
}
